package com.xyz.dao.logic;

import com.free.ext.mybatis.model.entity.PageResponseModel;
import com.xyz.dao.dao.CCustomerrechargelogDao;
import com.xyz.domain.table.CCustomerrechargelog;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public class CCustomerrechargelogLogic {

    @Autowired
    private CCustomerrechargelogDao cCustomerrechargelogDao;

    public CCustomerrechargelog add(CCustomerrechargelog cCustomerrechargelog){
        return cCustomerrechargelogDao.insert(cCustomerrechargelog);
    }

    public Integer update(CCustomerrechargelog cCustomerrechargelog){
        return cCustomerrechargelogDao.update(cCustomerrechargelog);
    }

    public List<CCustomerrechargelog> list(CCustomerrechargelog cCustomerrechargelog, String orderBy){
        return cCustomerrechargelogDao.selectList(cCustomerrechargelog, orderBy);
    }

    public Integer delete(Integer key){
        return cCustomerrechargelogDao.delete(key);
    }

    public PageResponseModel<CCustomerrechargelog> pageInfo(CCustomerrechargelog cCustomerrechargelog, String orderBy, Integer pageNo, Integer pageSize){
        return cCustomerrechargelogDao.selectByPageNo(cCustomerrechargelog, orderBy, pageNo, pageSize);
    }

}